from django.urls import path
from .views import *

urlpatterns = [
    #前台首页
    path('',IndexViews.index,name="myhome_index"),
    #列表页
    path('list/<int:tid>',IndexViews.booklist,name="myhome_list"),
    #详情页
    path('detail/<int:bid>',IndexViews.detail,name="myhome_detail"),


    #购物车列表
    path('cart/index',CartViews.index,name="myhome_cart_index"),
    #加入购物车
    path('cart/add',CartViews.add,name="myhome_cart_add"),
    #更新购物车数量
    path('cart/edit',CartViews.edit,name="myhome_cart_edit"),
    #删除购物车商品
    path('cart/delete',CartViews.delete,name="myhome_cart_delete"),


    #订单结算页
    path('order/confirm',OrderViews.confirm,name="myhome_order_confirm"),
    #订单创建
    path('order/create',OrderViews.create,name="myhome_order_create"),
    #发起支付请求
    path('order/pay/<int:orderid>',OrderViews.buypay,name="myhome_order_pay"),

    # 个人中心 我的订单
    path('myself/mylist',MyselfViews.mylist,name="myhome_myself_mylist"),

    # 回调地址
    path('myself/pay_result',PayViews.pay_result,name="myhome_pay_result"),
    #
    path('myself/pay_getresult',PayViews.pay_getresult,name="myhome_pay_getresult"),

    #登陆界面
    path('login',LoginViews.login,name="myhome_login"),
    path('dologin',LoginViews.dologin,name="myhome_dologin"),
    path('logout',LoginViews.logout,name="myhome_logout"),
    path('register',LoginViews.register,name="myhome_register"),
    path('doregister',LoginViews.doregister,name="myhome_doregister"),
    path('checkphone',LoginViews.checkphone,name="myhome_checkphone"),
    path('sendphone',LoginViews.sendphone,name="myhome_sendphone"),
]